<?php

namespace backend;

use Yii;

class Backend
{

    /**
     * @var string
     */
    public static $backendDir = '';

    /**
     * 返回一个规范的后台地址
     *
     * @param string $url
     * @return string
     */
    public static function url($url)
    {
        $url = trim($url);
        $url = ltrim($url, '/');

        return '/' . self::$backendDir . $url;
    }

}
